<%@ page import="java.util.ArrayList" %>
<%@ page import="pojo.Student" %>
<%@ page import="java.util.List" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>test2</title>
    <style>
        table{
            border: pink 3px solid;
        }
        td{
            border: pink 1px solid;
        }
        tr{
            border: pink 1px solid;
        }
    </style>
</head>
<body>
    <table align="center" cellspacing="0px">
        <tr>
            <td>id</td>
            <td>name</td>
            <td>age</td>
            <td>phone</td>
        </tr>
    <%
        List<Student> list=new ArrayList<>();
        list= (List<Student>) request.getAttribute("list");
        for(Student it:list){
            out.print("<tr>");
            out.print("<td>"+it.getId()+"</td>");
            out.print("<td>"+it.getName()+"</td>");
            out.print("<td>"+it.getAge()+"</td>");
            out.print("<td>"+it.getPhone()+"</td>");
            out.print("</tr>");
        }
    %>
    </table>
</body>
</html>
